package com.party.mobile.task;

import com.party.common.utils.DateUtils;
import com.party.mobile.biz.analysis.StatisticsFlowBizService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 页面统计
 *
 * @author yifeng
 * @date 2018/9/13 0013
 * @time 上午 11:15
 */
@Component(value = "quartzForPage")
public class QuartzForPage {
    Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private StatisticsFlowBizService statisticsFlowBizService;

    @Scheduled(cron = "0 0 3 * * ?")
    public void analysisFunnel() {
        logger.info("处理页面开始 《《《《《《《《《《《《《");
        Date yesterday = DateUtils.yesterday();
        statisticsFlowBizService.analysisPage(yesterday);
        logger.info("处理页面结束 《《《《《《《《《《《《《");
    }
}
